<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增HBase表快照')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-snapshot-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">筛选表名：</label>
            <div class="col-sm-8">
                <select name="tableName" class="form-control">
                    <option th:each="tableName:${allTableNames}" th:value="${tableName}"
                            th:text="${tableName}"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">快照名称：</label>
            <div class="col-sm-8">
                <input name="snapshotName" placeholder="请输入HBase表的快照名称, 默认表名加当前时间" class="form-control" type="text" >
            </div>
        </div>

    </form>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:src="@{/js/jquery.tmpl.js}"></script>

<script th:inline="javascript">
    /* 主子表-提交 */
    var prefix = ctx + "system/snapshot"
    $("#form-snapshot-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-snapshot-add").serializeArray();
            $.operate.save(prefix + "/add", data);
        }
    }
</script>
</body>
</html>